import sqlite3
import getpass

# Create the connection
connection = sqlite3.connect("forum.db")
cursor = connection.cursor()

with open("dump.sql", "w") as f:
    for line in connection.iterdump():
        f.write("%s\n" % line)
